<%- column_div :type => :primary do -%>
  <h2>Editing preferences</h2>

  <%= error_messages_for :preferences %>

  <% form_for :preferences,
              :url => admin_preference_path(@preferences),
              :html => { :method => :put } do |f| %>
              
    <div class="form_row">
      <label for="app_name">Application name</label>
      <%= f.text_field :app_name %>
    </div>
    
    <div class="form_row">
      <label for="domain">Email domain</label>
      <%= f.text_field :domain %>
    </div>

    <div class="form_row">
      <label for="server_name">Server name</label>
      <%= f.text_field :server_name %>
    </div>

    <div class="form_row">
      <label for="smtp_server">Smtp server</label>
      <%= f.text_field :smtp_server %>
    </div>

    <p>Send email when messages, connection requests, etc., are sent</p>
    <div class="form_row">
      <label for="email_notifications"
             class="checkbox">Email notifications</label>
      <%= f.check_box :email_notifications %>
    </div>

    <br />

    <p>Display a note that the site is just a demonstration</p>  
    <div class="form_row">
      <label for="demo"
             class="checkbox">Demo site</label>
      <%= f.check_box :demo %>
    </div>

    <br />

    <p>Verify email for new registrations using an activation code</p>  
    <div class="form_row">
      <label for="email_verifications"
             class="checkbox">Email verifications</label>
      <%= f.check_box :email_verifications %>
    </div>

    <br />

    <div class="form_row">
      <label for="about">About</label>
      <br />
      <p><%= formatting_note %></p>

      <%= f.text_area :about, :rows => 10 %>
    </div>
    
    <br />

    <div class="form_row">
      <label for="analytics">Analytics (will be inserted 
         just before the <%= h("</body>") %> tag)</label>
      <%= f.text_area :analytics, :rows => 10 %>
    </div>

    <div class="form_row">
      <%= f.submit "Update", :class => "button" %>
    </div>
      or <%= link_to "Cancel", admin_preferences_path %>
  <% end %>
<%- end -%>